package com.xjm.i1.core.context;

import com.xjm.i1.core.resolver.MetaDataResolveAdapter;
import com.xjm.i1.core.struct.node.load.I1DataCollections;

/**
 * 负责全局传递参数
 * */
public class ApplicationContextHolder {

    // 所有配置文件加载器
    private static PropertySourceLoader propertySourceLoader;

    // 加载数据的顶层结构
    private static I1DataCollections i1DataCollections;

    // 加载数据适配器，可加载i1数据
    private static MetaDataResolveAdapter metaDataResolveAdapter;

    public static PropertySourceLoader getPropertySourceLoader() {
        return propertySourceLoader;
    }

    public static void setPropertySourceLoader(PropertySourceLoader propertySourceLoader) {
        ApplicationContextHolder.propertySourceLoader = propertySourceLoader;
    }

    public static I1DataCollections getI1DataCollections() {
        return i1DataCollections;
    }

    public static void setI1DataCollections(I1DataCollections i1DataCollections) {
        ApplicationContextHolder.i1DataCollections = i1DataCollections;
    }

    public static MetaDataResolveAdapter getMetaDataResolveAdapter() {
        return metaDataResolveAdapter;
    }

    public static void setMetaDataResolveAdapter(MetaDataResolveAdapter metaDataResolveAdapter) {
        ApplicationContextHolder.metaDataResolveAdapter = metaDataResolveAdapter;
    }
}
